<?php
$modes_enabled = Array(	'welcome', 
						'login',
						'client', 
						'fiche', 
						'test');

function request_param($method, $name, $default){
	$method = strtoupper($method);
	if ( $method==='GET' OR $method==='POST'){
		$tab = '_'.$method;
		var_dump($$tab);
	}
	return $default;
}

function request_mode(){
	global $modes_enabled;
	$mode = get_param('mode', $modes_enabled[0]);
	if ( in_array($mode, $modes_enabled) ){
		return $mode;
	}
	return $modes_enabled[0];
}
?>
